/*
 * Copyright 2008 David L. Whitehurst, Cape Henry Technologies Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.cpht.app.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "contents", catalog = "genesis_development")
public class Content implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -8637201898604420248L;

    private int id;

    private String title;

    private String titleShort;

    private String text;

    private Boolean published;

    private Boolean frontPage;

    private Integer order;

    private String section;

    private String category;

    private String author;

    private Date createDate;

    private Date updateDate;

    public Content() {
    }

    public Content(int id) {
        this.id = id;
    }

    public Content(int id, String title, String titleShort, String text,
            Boolean published, Boolean frontPage, Integer order,
            String section, String category, String author, Date createDate,
            Date updateDate) {
        this.id = id;
        this.title = title;
        this.titleShort = titleShort;
        this.text = text;
        this.published = published;
        this.frontPage = frontPage;
        this.order = order;
        this.section = section;
        this.category = category;
        this.author = author;
        this.createDate = createDate;
        this.updateDate = updateDate;
    }

    @Id
    @Column(name = "id", unique = true, nullable = false)
    public int getId() {
        return this.id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name = "title")
    public String getTitle() {
        return this.title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Column(name = "title_short")
    public String getTitleShort() {
        return this.titleShort;
    }

    public void setTitleShort(String titleShort) {
        this.titleShort = titleShort;
    }

    @Column(name = "text", length = 65535)
    public String getText() {
        return this.text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Column(name = "published")
    public Boolean getPublished() {
        return this.published;
    }

    public void setPublished(Boolean published) {
        this.published = published;
    }

    @Column(name = "front_page")
    public Boolean getFrontPage() {
        return this.frontPage;
    }

    public void setFrontPage(Boolean frontPage) {
        this.frontPage = frontPage;
    }

    @Column(name = "order")
    public Integer getOrder() {
        return this.order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    @Column(name = "section")
    public String getSection() {
        return this.section;
    }

    public void setSection(String section) {
        this.section = section;
    }

    @Column(name = "category")
    public String getCategory() {
        return this.category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Column(name = "author")
    public String getAuthor() {
        return this.author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "create_date", length = 10)
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "update_date", length = 10)
    public Date getUpdateDate() {
        return this.updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

}
